From: Jasper St. Pierre Date: Mon, 23 Jul 2012 02:02:31 +0000 (-0300) Subject: boxpointer: Cope with a missing -arrow-border-color when we have no border X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~6237 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=e7e56e175aa54b8cfb4c00271298c4716726413a;p=gnome-shell.git boxpointer: Cope with a missing -arrow-border-color when we have no border https://bugzilla.gnome.org/show_bug.cgi?id=680426 --- diff --git a/js/ui/boxpointer.js b/js/ui/boxpointer.js index c83c31e42..03d114bac 100644 --- a/js/ui/boxpointer.js +++ b/js/ui/boxpointer.js @@ -252,7 +252,6 @@ const BoxPointer = new Lang.Class({ let halfBorder = borderWidth / 2; let halfBase = Math.floor(base/2); - let borderColor = themeNode.get_color('-arrow-border-color'); let backgroundColor = themeNode.get_color('-arrow-background-color'); let [width, height] = area.get_surface_size(); @@ -263,7 +262,6 @@ const BoxPointer = new Lang.Class({ boxWidth -= rise; } let cr = area.get_context(); - Clutter.cairo_set_source_color(cr, borderColor); // Translate so that box goes from 0,0 to boxWidth,boxHeight, // with the arrow poking out of that @@ -359,9 +357,13 @@ const BoxPointer = new Lang.Class({ Clutter.cairo_set_source_color(cr, backgroundColor); cr.fillPreserve(); - Clutter.cairo_set_source_color(cr, borderColor); - cr.setLineWidth(borderWidth); - cr.stroke(); + + if (borderWidth > 0) { + let borderColor = themeNode.get_color('-arrow-border-color'); + Clutter.cairo_set_source_color(cr, borderColor); + cr.setLineWidth(borderWidth); + cr.stroke(); + } }, setPosition: function(sourceActor, alignment) {